package models

import (
	"github.com/goravel/framework/database/orm"
)

type ChatLog struct {
	orm.Model
	ActionTime      string         `gorm:"column:action_time;type:varchar(255);not null" form:"action_time" json:"action_time"`
	UserId          string         `gorm:"column:user_id;type:varchar(255);not null" form:"user_id" json:"user_id"`
	UserName        string         `gorm:"column:user_name;type:varchar(255);not null" form:"user_name" json:"user_name"`
	StreamId        string         `gorm:"column:stream_id;type:varchar(255);not null" form:"stream_id" json:"stream_id"`
	MessageType     string         `gorm:"column:message_type;type:varchar(255);not null" form:"message_type" json:"message_type"`
	MessageContent  string         `gorm:"column:message_content;type:varchar(255);not null" form:"message_content" json:"message_content"`
	OriginalText    string         `gorm:"column:original_text;type:text;not null;comment:'原文'" json:"original_text"`
	ConfigurationID int            `gorm:"column:configuration_id;type:int;null" form:"configuration_id" json:"configuration_id"`
	Configuration   *Configuration `gorm:"foreignkey:ConfigurationID" form:"-" json:"-"`
}

func (*ChatLog) TableName() string {
	return "chatlogs"
}
